/*
 * GuildFraktionInfo - list the reputation and the guild level of all members of a wow guild
 * Copyright (C) [2012 - 2013] [www.marantis.de]
 * 
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 
 * License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later 
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program; if not, 
 * see <http://www.gnu.org/licenses/>.
 */
package de.marantis.app.wow.gfi.beans;

import java.io.Serializable;

public class GuildCharacterBean implements Comparable<GuildCharacterBean>,
		Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String charArmoryLink;
	private String charName;
	private int charLevel;
	private String guildRank;
	private int spec;
	private boolean loadFlag;
	private boolean errorFlag;
	private ReputationBean guildReputation;

	private ItemLevelBean itemLevel;

	@Override
	public String toString() {
		return this.charName;
	}

	@Override
	public int compareTo(GuildCharacterBean charBean) {
		return this.charName.compareTo(charBean.getCharName());
	}

	/*
	 * *** GETTER / SETTER
	 * ******************************************************
	 * ***************************************
	 */
	public String getCharArmoryLink() {
		return charArmoryLink;
	}

	public void setCharArmoryLink(String charArmoryLink) {
		this.charArmoryLink = charArmoryLink;
	}

	public String getCharName() {
		return charName;
	}

	public void setCharName(String charName) {
		this.charName = charName;
	}

	public int getCharLevel() {
		return charLevel;
	}

	public void setCharLevel(int charLevel) {
		this.charLevel = charLevel;
	}

	public String getGuildRank() {
		if (guildRank.equals("0")) {
			return "Gildenmeister";
		} else if (guildRank.equals("1")) {
			return "Offizier";
		} else if (guildRank.equals("2")) {
			return "Offi-Twink";

		} else if (guildRank.equals("3")) {
			return "Raidmember";

		} else if (guildRank.equals("5")) {
			return "Rbg-Team";

		} else if (guildRank.equals("6")) {
			return "Twink";

		} else if (guildRank.equals("7")) {
			return "Trial";
		} else if (guildRank.equals("8")) {
			return "Trial-Twink";
		} else if (guildRank.equals("9")) {
			return "Family&Friend";
		}

		else {
			return guildRank;
		}

	}

	public void setGuildRank(String guildRank) {
		this.guildRank = guildRank;
	}

	public boolean isLoadFlag() {
		return loadFlag;
	}

	public void setLoadFlag(boolean loadFlag) {
		this.loadFlag = loadFlag;
	}

	public boolean isErrorFlag() {
		return errorFlag;
	}

	public void setErrorFlag(boolean errorFlag) {
		this.errorFlag = errorFlag;
	}

	public ReputationBean getGuildReputation() {
		return guildReputation;
	}

	public void setGuildReputation(ReputationBean guildReputation) {
		this.guildReputation = guildReputation;
	}

	public ItemLevelBean getItemLevel() {
		return itemLevel;
	}

	public void setItemLevel(ItemLevelBean itemLevel) {
		this.itemLevel = itemLevel;
	}

	public int getSpec() {
		return spec;
	}

	public void setSpec(int spec) {
		this.spec = spec;
	}

}
